<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #3f3f3f; background-color: #f1f1f1;">
<body>
<style type="text/css">
  a, a:visited {
    color: #6bb5df !important;
  }

  a:hover {
    color: #CCCCCC !important;
  }
</style>
<div style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #3f3f3f; background-color: #f1f1f1;">
  <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" bgcolor="#f1f1f1">
    <tr>
      <td align="center" valign="top">
        <table border="0" id="emailContainer" style="max-width: 600px;">
          <tr>
            <td align="center" valign="top">
              <div align="left">
                <h2 style="font-weight: normal;"><b>HOST</b> <%= _("ERRATA ADVISORY").upcase %></h2>
              </div>
              <table border="0" width="100%" id="emailHeader" style="background-color: #e1e2e3;" bgcolor="#e1e2e3">
                <tr>
                  <td align="left" valign="top" style="padding: 0px 20px;">
                    <%= render :partial => 'host_dashboard', :locals => {:hosts => @hosts, :title => _("Hosts with Installable Errata")} %>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td align="center" valign="top">
              <table border="0" width="100%" id="emailBody" style="background-color: #fff; margin-top: 10px; padding: 0px 0px 15px;" bgcolor="#fff">
                <tr>
                  <td align="center" valign="top" style="padding: 0px 20px 5px;">

                    <% @hosts.group_by(&:organization).each do |org, hosts| %>
                      <h3 style="text-align: left; margin: 10px 0px 5px;" align="left"><%= org %></h3>

                      <p style="text-align: left; font-size: 75%; margin: 5px;" align="left">
                        <%= _("The following hosts have errata that apply to them: ") %>
                      </p>
                      <table class="errata" style="border: 1px solid #cccccc; padding: 5px; background-color: #ffffff; border-collapse: collapse; text-align: justify; width: 100%;" bgcolor="#ffffff">
                        <tr>
                          <th style="text-align: left; border-collapse: collapse; background-image: linear-gradient(#f5f5f5, #e8e8e8); padding: 4px; border: 1px solid #cccccc;" align="left"><%= _("Host") %></th>
                          <th style="border-collapse: collapse; background-image: linear-gradient(#f5f5f5, #e8e8e8); text-align: center; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Security") %></th>
                          <th style="border-collapse: collapse; background-image: linear-gradient(#f5f5f5, #e8e8e8); text-align: center; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Bugfix") %></th>
                          <th style="border-collapse: collapse; background-image: linear-gradient(#f5f5f5, #e8e8e8); text-align: center; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Enhancement") %></th>
                        </tr>
                        <% hosts.sort.each do |host| %>
                          <tr>
                            <td style="text-align: left; border-collapse: collapse; background-color: #FFFFFF; padding: 4px; border: 1px solid #cccccc;" width="48%" align="left" bgcolor="#FFFFFF"><%= link_to host, content_host_errata_path(host) %></td>
                            <td width="18%" style="border-collapse: collapse; text-align: center; background-color: #FFFFFF; padding: 4px; border: 1px solid #cccccc;" align="center" bgcolor="#FFFFFF"><%= errata_count(host, :security) %></td>
                            <td width="18%" style="border-collapse: collapse; text-align: center; background-color: #FFFFFF; padding: 4px; border: 1px solid #cccccc;" align="center" bgcolor="#FFFFFF"><%= errata_count(host, :bugfix) %></td>
                            <td width="18%" style="border-collapse: collapse; text-align: center; background-color: #FFFFFF; padding: 4px; border: 1px solid #cccccc;" align="center" bgcolor="#FFFFFF"><%= errata_count(host, :enhancement) %></td>
                          </tr>
                        <% end -%>
                      </table>
                    <% end -%>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td align="center" valign="top">
              <table border="0" cellpadding="20" cellspacing="0" width="100%" id="emailFooter" style="background-color: #e1e2e3;" bgcolor="#e1e2e3">
                <tr>
                  <td align="left" valign="top" style="font-size: 82%; padding: 0px 20px;">
                    <p><%= _("Note: The number in parentheses reflects all applicable errata from the Library environment that are unavailable to the host. You will need to promote this content to the relevant content view in order to make it available.") %></p>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>
</body>
</html>
